package com.nsoft.remotemedia.utils;

import android.graphics.Bitmap;
import android.os.AsyncTask;
import android.widget.ImageView;

public class ImageLoader extends 
 			AsyncTask<Void,Integer,Void> {
	ImageView imageView;
	String bmpUrl;
	Bitmap bmp;

	public ImageLoader(ImageView _imgView, 
						String _bmpUrl) {
		this.imageView=_imgView;
		this.bmpUrl=_bmpUrl;
	}

	@Override
	protected Void doInBackground(Void... params) {
		try {
			this.bmp=U2bUtils.getBitmapFromUrl(this.bmpUrl);
		}catch(Exception e){}
		return null;
	}

	@Override
	protected void onPostExecute(Void result) {
		this.imageView.setImageBitmap(bmp);
	}
}
